local ma__weilan = fk.CreateSkill {
  name = "ma__weilan",
}

Fk:loadTranslationTable{
  ["ma__weilan"] = "威澜",
  [":ma__weilan"] = "出牌阶段，你可以与一名角色拼点，然后你与其之中手牌中没有【杀】的角色对对方造成1点伤害。若你没赢且因此受到伤害，本回合此技能失效。",

  ["$ma__weilan1"] = "",
  ["$ma__weilan2"] = "",
}

ma__weilan:addEffect("active", {
  anim_type = "offensive",
  card_num = 0,
  target_num = 1,
  card_filter = Util.FalseFunc,
  target_filter = function(self, player, to_select, selected)
    return #selected == 0 and to_select ~= player and player:canPindian(to_select)
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    local pindian = player:pindian({target}, ma__weilan.name)
    local tos = {player, target}
    room:sortByAction(tos)
    for i = 1, 2, 1 do
      local to1, to2 = tos[i], tos[3-i]
      if to1:isAlive() and to2:isAlive() then
        local slashs = table.filter(to1:getCardIds("h"), function(id)
        return Fk:getCardById(id).trueName == "slash"
        end)
        if #slashs == 0 then
        room:damage{
          from = to1,
          to = to2,
          damage = 1,
        }
          if to1 ~= player and pindian.results[target].winner ~= player then
            room:invalidateSkill(player, ma__weilan.name, "-turn")
          end
        end
      end
    end
  end,
})

return ma__weilan